#ifndef _BUTTONS_H_
#define _BUTTONS_H_

#define BUTTON_DDR DDRB
#define BUTTON_PORT PORTB
#define BUTTON_PIN PINB

#define BUT1 1
#define BUT2 0

#define BUTTON_ison(i) !(BUTTON_PIN & (1<<BUT##i))
#define BUTTON_isoff(i) (BUTTON_PIN & (1<<BUT##i))

#define STEROWANIE_KOMPUTEREM_ison()	BUTTON_ison(1)
#define ZEZWOLENIE_ison()				BUTTON_ison(2)

inline void BUTTONS_init()
{
	//Przyciski jako wejscia DDR = 0
	BUTTON_DDR &= ~((1<<BUT1) | (1<<BUT2));
	BUTTON_PORT |= ((1<<BUT1) | (1<<BUT2));
}

#endif
